home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group94a.txt
/
000172_icon-group-sender _Wed Jun 15 04:24:26 1994.msg
< prev
next >
Wrap
Internet Message Format
|
1994-08-19
|
2KB
Received: by cheltenham.cs.arizona.edu; Wed, 15 Jun 1994 08:34:12 MST
Date: 15 Jun 94 04:24:26 GMT
From: news.delphi.com!usenet@uunet.uu.net
Organization: Delphi (info@delphi.com email, 800-695-4005 voice)
Subject: Coexpression Question
Message-Id: <Js+OHX6.cbarilleaux@delphi.com>
Sender: icon-group-request@cs.arizona.edu
To: icon-group@cs.arizona.edu
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
Hi! I'm trying to learn Icon, but have reached a road block in my studies.
I wanted to write a "spinner" program, which would use the /,\,-,and |
characters to produces a spinning inmage, by displaying one, using \b
to delete it, then displaying the next. having just finished the chapter
of _The Icon Programming Language_ on co-expressions, so, I thoughtI could
use them. The code looks like this:
procedure main()
spin:=create("\b-"|"\b\\"|"\b|"|"\b/")
writes(" ")
every 1 to 50 do {
writes(@spin)|spin:=^spin
}
write("\n")
end
However, I try running it, and I get the follwing error messages:
C:\PRG\ICON\WORK>iconx spinfoo
-
Run-time error 111
File spinfoo.icn; Line 5
variable expected
offending value: "\b-"
Trace back:
main()
{"\b-" := co-expression_3(0)} from line 5 in spinfoo.icn
I ahve tried to figure out just what is meant by this. I have figured out a
work-around, but I suspect that alternation like I used can work.
Any advice?
Thanks in advance
--
__________________________________________________________________
Charles Barilleaux CBARILLEAUX@DELPHI.COM
First Federal Savings & Loan Lake Charles, Louisiana
PGP Public Key Available Upon Request